﻿using System;
using System.Windows;
using System.Windows.Input;
using MathematicallySafe.HeadCounter.ViewModels;

namespace MathematicallySafe.HeadCounter.Views
{
    /// <summary>
    /// Interaction logic for HeadCounterView.xaml
    /// </summary>
    public partial class HeadCounterView : Window
    {
        public HeadCounterView()
        {
            InitializeComponent();
        }

        public HeadCounterViewModel ViewModel
        {
            get { return DataContext as HeadCounterViewModel; }
            set { DataContext = value; }
        }

        private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            DragMove();
        }

        private void Minimise_Click(object sender, RoutedEventArgs e)
        {
            WindowState = WindowState.Minimized;
        }

        private void Maximise_Click(object sender, RoutedEventArgs e)
        {
            if (WindowState == WindowState.Maximized)
            {
                WindowState = WindowState.Normal;
            }
            else
            {
                WindowState = WindowState.Maximized;
            }
        }
    }
}